import { createStore } from "vuex";
import user from "./user";
import socket from "./socket";
import notify from "./notify";
import dynamic from "./dynamic";
import getters from "./getters";

const state = {
  show: false,
};

const actions = {
  setShow: (store, isShow) => {
    store.commit("SET_SHOW", isShow);
  },
};

const mutations = {
  SET_SHOW: (state, isShow) => {
    state.show = isShow;
  },
};

export default createStore({
  state,
  actions,
  mutations,
  modules: {
    user,
    socket,
    notify,
    dynamic,
  },
  getters,
});
